Skip to content

ci: introduce conventional commits & commitlint#1184

Merged
ken-matsui merged 3 commits intomainfrom
commitlint
Jul 15, 2025
Merged

ci: introduce conventional commits & commitlint#1184
ken-matsui merged 3 commits intomainfrom
commitlint

Conversation

@ken-matsui
Copy link
Member

@ken-matsui ken-matsui commented Jul 15, 2025

Introduce conventional commits & commitlint for automated commit message checks. No one could understand the previous rule (to be fair, I also got confused sometimes). This reduces the maintainer's workload.

Summary by CodeRabbit

  • Chores
    • Added automated commit message validation for pushes and pull requests to ensure adherence to conventional commit standards.
    • Simplified commit message and pull request guidelines to align with the Conventional Commits specification.

@coderabbitai
Copy link

coderabbitai bot commented Jul 15, 2025

Warning

Rate limit exceeded

@ken-matsui has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 17 minutes and 58 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

📥 Commits

Reviewing files that changed from the base of the PR and between bc5929f and 9de3a72.

📒 Files selected for processing (1)
  • CONTRIBUTING.md (1 hunks)

Walkthrough

A new GitHub Actions workflow is added to automate commit message linting on push and pull request events. The workflow installs necessary dependencies, checks out the repository, prints relevant tool versions, and runs commitlint to validate commit messages according to the conventional commit standard. The contributing guide is updated to simplify commit message instructions and align PR guidelines with Conventional Commits.

Changes

File(s) Change Summary
.github/workflows/commitlint.yml Added a CI workflow to automate commit message linting using commitlint on push and pull request events.
CONTRIBUTING.md Simplified commit message guidelines to follow Conventional Commits; updated PR style instructions accordingly; clarified commit history management in PRs.

Sequence Diagram(s)

sequenceDiagram
    participant GitHub
    participant Workflow
    participant Runner
    participant CommitLint

    GitHub->>Workflow: Trigger on push or pull_request
    Workflow->>Runner: Start job (commitlint)
    Runner->>Runner: Checkout repository
    Runner->>Runner: Set up Node.js
    Runner->>Runner: Install commitlint dependencies
    Runner->>Runner: Print versions (git, node, npm, commitlint)
    alt push event
        Runner->>CommitLint: Lint last commit message
    else pull_request event
        Runner->>CommitLint: Lint all PR commit messages
    end
    CommitLint-->>Runner: Return lint results
    Runner-->>Workflow: Complete job
Loading

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🧹 Nitpick comments (1)
.github/workflows/commitlint.yml (1)

1-4: Workflow name is generic.

The top-level name CI is broad; most projects already have a CI workflow for tests/builds. Renaming to something like Commit Lint avoids confusion in the Actions tab.

-name: CI
+name: Commit Lint
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7d5a0ab and f834189.

📒 Files selected for processing (1)
  • .github/workflows/commitlint.yml (1 hunks)

@ken-matsui ken-matsui changed the title ci: add commitlint ci: introduce conventional commits & commitlint Jul 15, 2025
@ken-matsui ken-matsui enabled auto-merge (squash) July 15, 2025 00:34
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (2)
CONTRIBUTING.md (2)

120-123: Spell-out what “follow Conventional Commits” actually means

A single-line reference is concise, but newcomers may not click through.
Consider adding a one-sentence example (feat(parser): support JSON5) or a
bullet list of the minimum rules enforced by commitlint (type + scope, lowercase
type, no trailing period, ≤ 72 chars, etc.). This keeps the doc self-contained
while still deferring to the full spec.


126-128: “Description: Follow Conventional Commits” is misleading

The Conventional Commits spec governs the header (<type>(<scope>): <subject>)
and the optional body/footer of commits, not PR descriptions.
Stating that the PR “Description” must also follow the spec can confuse
contributors (e.g., do they need to write a BREAKING CHANGE: footer in the PR
body?).

Proposed tweak:

-1. **Title**: Follow Conventional Commits.
-2. **Description**: Follow Conventional Commits.
+1. **Title**: Use a Conventional Commit–style header (e.g., `feat(ui): add dark mode`).
+2. **Description**: Provide context, motivation, and links; no strict format required.
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f834189 and bc5929f.

📒 Files selected for processing (2)
  • .github/workflows/commitlint.yml (1 hunks)
  • CONTRIBUTING.md (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/commitlint.yml
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (12)
  • GitHub Check: build & test (GCC 13)
  • GitHub Check: build & test (Apple Clang - macOS 14)
  • GitHub Check: build & test (Clang 16)
  • GitHub Check: build & test (Apple Clang - macOS 15)
  • GitHub Check: build & test (GCC 12)
  • GitHub Check: build & test (Clang 20)
  • GitHub Check: build & test (Apple Clang - macOS 13)
  • GitHub Check: build & test (GCC 14)
  • GitHub Check: create
  • GitHub Check: build & test (Clang 17)
  • GitHub Check: build & test (Clang 19)
  • GitHub Check: analyze (c-cpp)

@ken-matsui ken-matsui merged commit 445c106 into main Jul 15, 2025
23 checks passed
@ken-matsui ken-matsui deleted the commitlint branch July 15, 2025 01:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant